package com.piz.service.model;

import java.text.DecimalFormat;
import java.util.List;

import com.piz.model.OfferCoupon;

/**
 * @author prameetk.sharma
 *
 */
public class Cart {
	
	private List<PizzaItem> pizzas;
	
	private List<SideItem> sides;
	
	private Double totalPrice = 0.0;
	
	private Double tax = 0.0;
	
	private Double grandTotal = 0.0;
	
	private List<OfferCoupon> coupons; 
	
	private Double total_discount = 0.0;
	
	private DecimalFormat df = new DecimalFormat(".##");
	
	

	/**
	 * @return
	 */
	public List<PizzaItem> getPizzas() {
		return pizzas;
	}

	/**
	 * @param pizzas
	 */
	public void setPizzas(List<PizzaItem> pizzas) {
		this.pizzas = pizzas;
	}

	/**
	 * @return
	 */
	public List<SideItem> getSides() {
		return sides;
	}

	/**
	 * @param sides
	 */
	public void setSides(List<SideItem> sides) {
		this.sides = sides;
	}

	/**
	 * @return
	 */
	public Double getTotalPrice() {
		return Double.parseDouble(df.format(totalPrice));
	}

	/**
	 * @param totalPrice
	 */
	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}



	/**
	 * @return
	 */
	public Double getTax() {
		return Double.parseDouble(df.format(tax));
	}

	/**
	 * @param tax
	 */
	public void setTax(Double tax) {
		this.tax = tax;
	}

	/**
	 * @return
	 */
	public Double getGrandTotal() {
		return Double.parseDouble(df.format(grandTotal));
	}

	/**
	 * @param grandTotal
	 */
	public void setGrandTotal(Double grandTotal) {
		this.grandTotal = grandTotal;
	}

	/**
	 * @return the List<Offer_Coupon> coupons
	 */
	public List<OfferCoupon> getCoupons() {
		return coupons;
	}

	/**
	 * @param coupons List<Offer_Coupon> the coupons to set
	 */
	public void setCoupons(List<OfferCoupon> coupons) {
		this.coupons = coupons;
	}

	/**
	 * @return the Double total_discount
	 */
	public Double getTotal_discount() {
		return total_discount;
	}

	/**
	 * @param total_discount Double the total_discount to set
	 */
	public void setTotal_discount(Double total_discount) {
		this.total_discount = total_discount;
	}

}
